home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Toolbox / Visual Basic Toolbox (P.I.E.)(1996).ISO / tpascal / bpvbx / vbdtool.pas < prev   
Encoding:
Pascal/Delphi Source File  |  1994-12-10  |  16.9 KB  |  515 lines

  1. {$S-,R-,V-,I-,B-,F-,W-,A-,G+,X+}
  2. {$C DEMANDLOAD,DISCARDABLE}
  3.  
  4. library VBDTool;
  5. {$R DTOOL.RES}
  6. {$D Micro System Solutions - MS VB3.0 dTool}
  7.  
  8. uses
  9.  
  10.     WsDos,
  11.     WinDos,
  12.     wintypes,
  13.     winprocs,
  14.  
  15.     vbapi_,
  16.     strings;
  17.  
  18. {//---------------------------------------------------------------------------
  19. // Resource ID's
  20. //---------------------------------------------------------------------------
  21. // Toolbox bitmap resource IDs.
  22. //---------------------------------------------------------------------------}
  23. const
  24.     UpTool    = 8000;
  25.     DnTool    = 8001;
  26.     MonoTool= 8003;
  27.     EGATool    = 8006;
  28.     DemoVersion = 4001;
  29.  
  30. {//---------------------------------------------------------------------------
  31. // Standard Error Values
  32. //---------------------------------------------------------------------------}
  33. const
  34.     ERR_None          =    0;
  35.     ERR_InvPropVal      =    380;     {/ Error$(380) = "Invalid property value"}
  36.     shutdown:    boolean = false;
  37.  
  38. {//---------------------------------------------------------------------------
  39. // control data and structs
  40. //---------------------------------------------------------------------------}
  41. type
  42.     pdTool = ^tdTool;
  43.     tdTool = record
  44.         usPathLen:    integer;
  45.         hszPathString:    Hsz;
  46.         hszDiskType:    Hsz;
  47.         hszDrive:        Hsz;
  48.         hszVolume:        Hsz;
  49.         ulSize:         longInt;
  50.         hszDate:        Hsz;
  51.         hszTime:        Hsz;
  52.         ulBytesPerCluster:  longint;
  53.         ulDiskCapacity:     longInt;
  54.         ulFreeSpace:        longInt;
  55.         usClustersAvail:    longint;
  56.         usTotalClusters:    Longint;
  57.         usBytesPerSector:   longint;
  58.         usSectorsPerCluster:     longint;
  59.         usAction:        Integer;
  60.     end;
  61.  
  62. const
  63.     bDevTimeInit:    boolean = false;
  64.     cVbxUsers:        integer = 0;
  65.  
  66.     fLicensed:            boolean = false;
  67.  
  68. var
  69.     lLicID:     longInt;
  70.     szBf:   array[0..48] of char;
  71.     dToolRec:    pdTool;
  72.     hModDll:    tHandle;
  73.     tBmap:        HBitMap;
  74.     bmWidth:    integer;
  75.     bmHeight:    integer;
  76.     strBuf:        array[0..24] of char;
  77.     DBuff:      TSearchRec;
  78.  
  79. const
  80.     PathLenName:    array[0..12] of Char = 'Status'#0;
  81.     Prop_PathLen: tPROPINFO  = (
  82.         npszName:     tOffset(@PathLenName);
  83.         fl:              DT_Short or PF_fGetData or PF_fSetData or PF_fSaveData;
  84.         offsetData: 0; infoData: 0; dataDefault: 0; npszEnumList: 0; enumMax: 0);
  85.  
  86.     PathStrName:    array[0..12] of Char = 'Path String'#0;
  87.     Prop_PathStr: tPROPINFO  = (
  88.         npszName:     tOffset(@PathStrName);
  89.         fl:              DT_HSZ or PF_fGetData or PF_fSetData or PF_fSaveData;
  90.         offsetData: 0; infoData: 0; dataDefault: 0; npszEnumList: 0; enumMax: 0);
  91.  
  92.     DriveName:    array[0..12] of Char = 'Drive'#0;
  93.     Prop_DriveLtr: tPROPINFO  = (
  94.         npszName:     tOffset(@DriveName);
  95.         fl:              DT_Hsz or PF_fGetData or PF_fSetData or PF_fSaveData;
  96.         offsetData: 0; infoData: 0; dataDefault: 0; npszEnumList: 0; enumMax: 0);
  97.  
  98.     DiskTypeName:    array[0..12] of Char = 'DiskType'#0;
  99.     Prop_DiskType: tPROPINFO  = (
  100.         npszName:     tOffset(@DiskTypeName);
  101.         fl:              DT_Hsz or PF_fGetData or PF_fSetData or PF_fSaveData;
  102.         offsetData: 0; infoData: 0; dataDefault: 0; npszEnumList: 0; enumMax: 0);
  103.  
  104.     VolumeName:    array[0..12] of Char = 'Volume'#0;
  105.     Prop_Volume: tPROPINFO  = (
  106.         npszName:     tOffset(@VolumeName);
  107.         fl:              DT_HSZ or PF_fGetData or PF_fSetData or PF_fSaveData;
  108.         offsetData: 0; infoData: 0; dataDefault: 0; npszEnumList: 0; enumMax: 0);
  109.  
  110.     SizeName:    array[0..12] of Char = 'Size'#0;
  111.     Prop_FileSize:  tPROPINFO  = (
  112.         npszName:     tOffset(@SizeName);
  113.         fl:              DT_Long or PF_fGetData or PF_fSetData or PF_fSaveData;
  114.         offsetData: 0; infoData: 0; dataDefault: 0; npszEnumList: 0; enumMax: 0);
  115.  
  116.     DateName:    array[0..12] of Char = 'Date'#0;
  117.     Prop_Date: tPROPINFO  = (
  118.         npszName:     tOffset(@DateName);
  119.         fl:              DT_Hsz or PF_fGetData or PF_fSetData or PF_fSaveData;
  120.         offsetData: 0; infoData: 0; dataDefault: 0; npszEnumList: 0; enumMax: 0);
  121.  
  122.     TimeName:    array[0..12] of Char = 'Time'#0;
  123.     Prop_Time: tPROPINFO  = (
  124.         npszName:     tOffset(@TimeName);
  125.         fl:              DT_Hsz or PF_fGetData or PF_fSetData or PF_fSaveData;
  126.         offsetData: 0; infoData: 0; dataDefault: 0; npszEnumList: 0; enumMax: 0);
  127.  
  128.     BPCName:    array[0..16] of Char = 'BytesPerCluster'#0;
  129.     Prop_BPC: tPROPINFO  = (
  130.         npszName:     tOffset(@BPCName);
  131.         fl:              DT_Long or PF_fGetData or PF_fSetData or PF_fSaveData;
  132.         offsetData: 0; infoData: 0; dataDefault: 0; npszEnumList: 0; enumMax: 0);
  133.  
  134.     DCName:    array[0..13] of Char = 'DiskCapacity'#0;
  135.     Prop_DC: tPROPINFO  = (
  136.         npszName:     tOffset(@DCName);
  137.         fl:              DT_Long or PF_fGetData or PF_fSetData or PF_fSaveData;
  138.         offsetData: 0; infoData: 0; dataDefault: 0; npszEnumList: 0; enumMax: 0);
  139.  
  140.     FSName:    array[0..12] of Char = 'FreeSpace'#0;
  141.     Prop_FS: tPROPINFO  = (
  142.         npszName:     tOffset(@FSName);
  143.         fl:              DT_Long or PF_fGetData or PF_fSetData or PF_fSaveData;
  144.         offsetData: 0; infoData: 0; dataDefault: 0; npszEnumList: 0; enumMax: 0);
  145.  
  146.     CAName:    array[0..18] of Char = 'ClustersAvailable'#0;
  147.     Prop_CA: tPROPINFO  = (
  148.         npszName:     tOffset(@CAName);
  149.         fl:              DT_Long or PF_fGetData or PF_fSetData or PF_fSaveData;
  150.         offsetData: 0; infoData: 0; dataDefault: 0; npszEnumList: 0; enumMax: 0);
  151.  
  152.     TCName:    array[0..14] of Char = 'TotalClusters'#0;
  153.     Prop_TC: tPROPINFO  = (
  154.         npszName:     tOffset(@TCName);
  155.         fl:              DT_Long or PF_fGetData or PF_fSetData or PF_fSaveData;
  156.         offsetData: 0; infoData: 0; dataDefault: 0; npszEnumList: 0; enumMax: 0);
  157.  
  158.     BPSName:    array[0..15] of Char = 'BytesPerSector'#0;
  159.     Prop_BPS: tPROPINFO  = (
  160.         npszName:     tOffset(@BPSName);
  161.         fl:              DT_Long or PF_fGetData or PF_fSetData or PF_fSaveData;
  162.         offsetData: 0; infoData: 0; dataDefault: 0; npszEnumList: 0; enumMax: 0);
  163.  
  164.     SPCName:    array[0..18] of Char = 'SectorsPerCluster'#0;
  165.     Prop_SPC: tPROPINFO  = (
  166.         npszName:     tOffset(@SPCName);
  167.         fl:              DT_Long or PF_fGetData or PF_fSetData or PF_fSaveData;
  168.         offsetData: 0; infoData: 0; dataDefault: 0; npszEnumList: 0; enumMax: 0);
  169.  
  170.     ActionName:    array[0..12] of Char = 'Action'#0;
  171.     Property_Action: tPROPINFO  = (
  172.         npszName:     tOffset(@ActionName);
  173.         fl:              DT_SHORT or PF_fSetMsg or PF_fNoShow;
  174.         offsetData: 0; infoData: 0; dataDefault: 0; npszEnumList: 0; enumMax: 0);
  175.  
  176. type
  177.     iPropIndex = (
  178.         IPROP_NAME,
  179.         IPROP_Tag,
  180.         IPROP_LEFT,
  181.         IPROP_Top,
  182.         iProp_PathLen,
  183.         iProp_PathStr,
  184.         iProp_Drive,
  185.         iProp_DiskType,
  186.         iProp_Volume,
  187.         iProp_Size,
  188.         iProp_Date,
  189.         iProp_Time,
  190.         iProp_BPC,
  191.         iProp_DC,
  192.         iProp_FS,
  193.         iProp_CA,
  194.         iProp_TC,
  195.         iProp_BPS,
  196.         iProp_SPC,
  197.         iProp_Action,
  198.         IPROP_Last);
  199.  
  200. const
  201.     PropertyList : array[IPROPIndex]of ofsPPROPINFO = (
  202.     pPROPInfo_STD_CTLNAME,
  203.     PPROPINFO_STD_TAG,
  204.     PPROPINFO_STD_LEFT,
  205.     PPROPINFO_STD_Top,
  206.     tOffset(@Prop_PathLen),        {Integer Value}
  207.     tOffset(@Prop_PathStr),        {String Value}
  208.     tOffset(@Prop_DriveLtr),        {Disk Drive letter}
  209.     tOffset(@Prop_DiskType),        {Disk Drive letter}
  210.     tOffset(@Prop_Volume),        {Volume Name}
  211.     tOffset(@Prop_FileSize),        {Volume Name}
  212.     tOffset(@Prop_Date),        {Volume Name}
  213.     tOffset(@Prop_Time),        {Volume Name}
  214.     tOffset(@Prop_BPC),
  215.     tOffset(@Prop_DC),
  216.     tOffset(@Prop_FS),
  217.     tOffset(@Prop_CA),
  218.     tOffset(@Prop_TC),
  219.     tOffset(@Prop_BPS),
  220.     tOffset(@Prop_SPC),
  221.     tOffset(@Property_Action),        { Action }
  222.     0);                                {Last}
  223.  
  224. {//---------------------------------------------------------------------------
  225. // Event Procedure Parameter Profiles go here
  226. //---------------------------------------------------------------------------}
  227.  
  228.  
  229. procedure PaintControl(Wnd: HWnd);
  230. var
  231.     hdcMem:    Hdc;
  232.     ps:        tPaintStruct;
  233. begin
  234.     BeginPaint(Wnd, ps);
  235.     hdcMem := CreateCompatibleDC(ps.hDc);
  236.     if (hdcMem = 0) then exit;
  237.     SelectObject(hdcMem, tBmap);
  238.     { Display the bitmap in the sizing rectangle}
  239.     BitBlt(ps.hdc, 0, 0, bmWidth, bmHeight, hdcMem, 0, 0, SRCCopy);
  240.     DeleteDC(hdcMem);
  241.     EndPaint(Wnd, ps);
  242. end;
  243.  
  244. function IntToStr(I: Longint): String;
  245. { Convert any integer type to a string }
  246. var
  247.    S: string[11];
  248. begin
  249.      Str(I, S);
  250.      IntToStr := S;
  251. end;
  252.  
  253. function DiskInfo(DriveLtr: char): longInt;
  254. var
  255.    drvNr:   byte;
  256. begin
  257.      drvNr := ord(upCase(DriveLtr)) - ord('A')+1;
  258.      dToolRec^.ulDiskCapacity := 0;
  259.      with dToolRec^ do begin
  260.          if GetDiskInfo(drvNr, word(usClustersAvail), word(usTotalClusters),
  261.                  word(usBytesPerSector), word(usSectorsPerCluster)) then begin
  262.             ulBytesPerCluster := longInt(usSectorsPerCluster) * usBytesPerSector;
  263.             ulDiskCapacity := LongInt(usTotalClusters) * ulBytesPerCluster;
  264.             ulFreeSpace := LongInt(usClustersAvail) * ulBytesPerCluster;
  265.          end;
  266.      end;
  267.      DiskInfo := dToolRec^.ulDiskCapacity;
  268. end;
  269.  
  270. function DiskType(DriveLtr: char): string;
  271. const
  272.   DiskClassName:    array[DiskClass] of string[12] = (
  273.                                'Floppy360', 'Floppy720', 'Floppy12', 'Floppy144',
  274.                                'OtherFloppy', 'Bernoulli', 'HardDisk', 'RamDisk',
  275.                                'SubstDrive', 'UnknownDisk', 'InvalidDrive',
  276.                                'NovellDrive', 'CDRomDisk');
  277.  
  278.   {This enumerated type defines the nine classes of disks that can be identified by
  279.   [GetDiskClass], as well as several types used as error indications}
  280.  
  281. var
  282.    SubstDriveLtr:   char;
  283.    ThisDiskType:         diskClass;
  284. begin
  285.      ThisDiskType := GetDiskClass(DriveLtr, SubstDriveLtr);
  286.      DiskType := IntToStr(ord(ThisDiskType)) + ' ' + DiskClassName[ThisDiskType];
  287. end;
  288.  
  289. function CtlProc(Control: HCtl; Wnd: HWnd;
  290.             Msg, WParam: Word; LParam: LongInt):LongInt; export;
  291. const
  292.     Gen_StrLen = 1;
  293.     ReadVolume = 2;
  294.     lpPath:      array[0..12] of char = 'A:\*.*'#0;
  295. var
  296.     stDType:     string;
  297.     arDType:      array[0..12] of char;
  298.     lpDType:     lpStr;
  299.  
  300.     stDate:     string[12];
  301.     arDate:      array[0..12] of char;
  302.     lpDate:     lpStr;
  303.  
  304.     stTime:     string[12];
  305.     arTime:      array[0..12] of char;
  306.     lpTime:     lpStr;
  307.  
  308.     DT:         TDateTime;
  309.     lpPathLen:     lpStr;
  310.     lpDrv:        lpStr;
  311.     lpVolName:    lpStr;
  312.     VolName:    array[0..11] of char;
  313.     status:        word;
  314. begin
  315.     case Msg of
  316.         WM_SIZE:    SetWindowPos(Wnd, 0, 0, 0, bmWidth, bmHeight, SWP_NOMOVE or SWP_NOZORDER);
  317.         WM_PAINT:    PaintControl(Wnd);
  318.         VBM_CREATED:    if (VBGetMode = MODE_RUN) then begin
  319.                             CtlProc := 0;
  320.                             exit;
  321.                         end;
  322.         VBM_SETPROPERTY:    begin
  323.             dToolRec := VBDerefControl(Control);
  324.             case wParam of
  325.                 ord(IPROP_Action): begin
  326.                     case lParam of
  327.                         Gen_StrLen:    begin
  328.                             lpPathLen := VBDerefHsz(dToolRec^.hszPathString);
  329.                             dToolRec^.usPathLen := StrLen(lpPathLen);
  330.                         end;
  331.                         ReadVolume:    begin
  332.                             lpDrv := VBDerefHsz(dToolRec^.hszDrive);
  333.                             lpVolName := @VolName;
  334.                             status  := GetVolumeLabel(lpVolName, lpDrv^);
  335.                             if status = 0 then begin
  336.                                 dToolRec := VBDerefControl(Control);
  337.                                 if (dToolRec^.hszVolume <> nil) then begin
  338.                                     VBDestroyHsz(dToolRec^.hszVolume);
  339.                                 end;
  340.                                 if (dToolRec^.hszDate <> nil) then begin
  341.                                     VBDestroyHsz(dToolRec^.hszDate);
  342.                                 end;
  343.                                 if (dToolRec^.hszTime <> nil) then begin
  344.                                     VBDestroyHsz(dToolRec^.hszTime);
  345.                                 end;
  346.                                 if (dToolRec^.hszDiskType <> nil) then begin
  347.                                     VBDestroyHsz(dToolRec^.hszDiskType);
  348.                                 end;
  349.  
  350.                                 dToolRec := VBDerefControl(Control);
  351.  
  352.                                 stDType := DiskType(lpDrv^);
  353.                                 strPCopy(arDType, stDType);
  354.                                 lpDType := @arDType;
  355.                                 dToolRec^.hszDiskType := VBCreateHsz(pHandle(seg(Control^)), lpDType);
  356.  
  357.                                 dToolRec^.hszVolume := VBCreateHsz(pHandle(seg(Control^)), lpVolName);
  358.                                 lpPath[0] := lpDrv^;
  359.                                 FindFirst(lpPath, faVolumeId, dBuff);
  360.                                 dToolRec := VBDerefControl(Control);
  361.  
  362.                                 UnPackTime(DBuff.Time, DT);
  363.                                 stDate := intToStr(DT.month) + '/' + intToStr(DT.day) + '/' + intToStr(DT.year);
  364.                                 strPCopy(arDate, stDate);
  365.                                 lpDate := @arDate;
  366.                                 dToolRec^.hszDate := VBCreateHsz(pHandle(seg(Control^)), lpDate);
  367.  
  368.                                 stTime := intToStr(DT.hour) + ':' + intToStr(DT.min) + ':' + intToStr(DT.sec);
  369.                                 strPCopy(arTime, stTime);
  370.                                 lpTime := @arTime;
  371.                                 dToolRec^.hszTime := VBCreateHsz(pHandle(seg(Control^)), lpTime);
  372.  
  373.                                 dToolRec^.hszPathString := VBCreateHsz(pHandle(seg(Control^)), lpPath);
  374.  
  375.  
  376.                                 dToolRec^.ulSize := DiskInfo(lpDrv^);
  377.  
  378.                                 CtlProc := 0;
  379.                                 exit;
  380.                             end else begin
  381.                                 dToolRec^.usPathLen := Status;
  382.                                 CtlProc := 0;
  383.                                 exit;
  384.                             end;
  385.                         end;
  386.                     end;
  387.                     dToolRec^.usAction := lParam;
  388.                     CtlProc := 0;
  389.                     exit;
  390.                 end;
  391.             end;
  392.         end;
  393.     end;
  394.  
  395.     {Default processing:}
  396.     CtlProc := VBDefControlProc(Control, Wnd, Msg, WParam, LParam);
  397. end;
  398.  
  399. {//---------------------------------------------------------------------------
  400. // Model struct
  401. //---------------------------------------------------------------------------
  402. // Define the control model (using the event and property structures).
  403. //---------------------------------------------------------------------------}
  404. const
  405. ModelDefCtlName:     array[0..8] of Char = 'DiskTool'#0;         { default control name prefix}
  406. ModelClassName:        array[0..15] of Char = 'ThunderDiskTool'#0;{ Visual Basic class name}
  407. ModelParentClassName:    array[0..8] of Char = #0;    { Parent window class if subclassed}
  408. ModelFmtTool: TMODEL = (
  409.     usVersion:        VB_VERSION;                    { VB version used by control}
  410.     fl:             {Model_fInvisAtRun or }Model_fInitMsg or Model_fLoadMsg;    { Bitfield structure}
  411.     ctlproc:        TFarProc(@CtlProc);            { The control proc.}
  412.     fsClassStyle:    cs_VRedraw or cs_HRedraw;    { window class style}
  413.     flWndStyle:        WS_Child or WS_Border;         { default window style}
  414.     cbCtlExtra:        sizeof(tdTool);            { # bytes alloc'd for HCTL structure}
  415.     idBmpPalette:    UpTool;                        { BITMAP id for tool palette}
  416.     DefCtlName:     tOffset(@ModelDefCtlName);     { default control name prefix}
  417.     ClassName:        tOffset(@ModelClassName);    { Visual Basic class name}
  418.     ParentClassName:    0{tOffset(@ModelParentClassName)};        { Parent window class if subclassed}
  419.     proplist:        ofs(PropertyList);                { Property list}
  420.     eventlist:        0{ofs(EventList)};                 { Event list}
  421.     nDefProp:         0{ord(IPROP_Circ1_BackColor)};    { index of default property}
  422.     nDefEvent:        0{ord(Event_Circ1_ClickIn)};    { index of default event}
  423.     nValueProp:        0{ord(IPROP_Circ1_Shape)}        { default value }
  424. );
  425.  
  426. function LicenseProc(Wnd: HWnd; iMsg: word; WParam: Word; LParam: LongInt):boolean; export;
  427. var
  428.    Rect:    tRect;
  429.    rectDesk:      tRect;
  430.    xSize, ySize:  integer;
  431.    xDeskSize, yDeskSize:  integer;
  432.    x, y:      integer;
  433. begin
  434.      case iMsg of
  435.           WM_INITDIALOG: begin
  436.               GetWindowRect(Wnd, Rect);
  437.               GetWindowRect(GetDeskTopWindow, rectDesk);
  438.               xSize := rect.right - rect.left;
  439.               ySize := rect.bottom - rect.top;
  440.               xDeskSize := rectDesk.right - rectDesk.left;
  441.               yDeskSize := rectDesk.bottom - rectDesk.top;
  442.               x := (xDeskSize - xSize) div 2;
  443.               y := (yDeskSize - ySize) div 2;
  444.               MoveWindow(Wnd, x, y, xSize, ySize, FALSE);
  445.           end;
  446.  
  447.           WM_COMMAND:
  448.                case wParam of
  449.                 IDOK:      EndDialog(Wnd, 0);
  450.                end;
  451.      end;
  452.      LicenseProc := true;
  453. end;
  454.  
  455. {//---------------------------------------------------------------------------
  456. // Register custom control.
  457. //    This routine is called by VB when the custom control DLL is
  458. //    loaded for use.
  459. //---------------------------------------------------------------------------}
  460. function VBINITCC(usVersion: Word; fRunTime: Boolean): Boolean; export;
  461. var
  462.      demoText: string;
  463.      demoCaption: string;
  464.     bmp:    tBitMap;
  465.     ParentHWnd:     HWnd;
  466. begin
  467.      inc(cVBXUsers);
  468.      tBMap := 0;
  469.      tBmap := LoadBitMap(hInstance, MakeIntResource(UpTool));
  470.      if (tBMap = 0) then begin
  471.         VBINITCC := false;
  472.     exit;
  473.      end;
  474.      GetObject(tBMap, sizeOf(bmp), @bmp);
  475.      bmWidth := bmp.bmWidth;
  476.      bmHeight := bmp.bmHeight;
  477.      bDevTimeInit := true;
  478.      VBINITCC := VBRegisterModel(hInstance, ModelFmtTool);
  479. end;
  480.  
  481. procedure VBTERMCC; export;
  482. begin
  483.      if shutdown then exit;
  484.      if cVBXUsers >= 0 then
  485.         dec(cVBXUsers);
  486.      if (tBMap <> 0) and (cVBXUsers = 0) and (bDevTimeInit) then begin
  487.         DeleteObject(tBMap);
  488.     shutdown := true;
  489.      end;
  490. end;
  491.  
  492. exports
  493.        VBINITCC index 1,
  494.        CtlProc index 2,
  495.        VBTERMCC index 3;
  496.  
  497. begin
  498.     Prop_PathLen.OffsetData := Ofs(tdTool(ptr(0,0)^).usPathLen);
  499.     Prop_PathStr.OffsetData := Ofs(tdTool(ptr(0,0)^).hszPathString);
  500.     Prop_DriveLtr.OffsetData := Ofs(tdTool(ptr(0,0)^).hszDrive);
  501.     Prop_DiskType.OffsetData := Ofs(tdTool(ptr(0,0)^).hszDiskType);
  502.     Prop_Volume.OffsetData := Ofs(tdTool(ptr(0,0)^).hszVolume);
  503.     Prop_FileSize.OffsetData := Ofs(tdTool(ptr(0,0)^).ulSize);
  504.     Prop_Date.OffsetData := Ofs(tdTool(ptr(0,0)^).hszDate);
  505.     Prop_Time.OffsetData := Ofs(tdTool(ptr(0,0)^).hszTime);
  506.     Prop_BPC.OffsetData := Ofs(tdTool(ptr(0,0)^).ulBytesPerCluster);
  507.     Prop_DC.OffsetData := Ofs(tdTool(ptr(0,0)^).ulDiskCapacity);
  508.     Prop_FS.OffsetData := Ofs(tdTool(ptr(0,0)^).ulFreeSpace);
  509.     Prop_CA.OffsetData := Ofs(tdTool(ptr(0,0)^).usClustersAvail);
  510.     Prop_TC.OffsetData := Ofs(tdTool(ptr(0,0)^).usTotalClusters);
  511.     Prop_BPS.OffsetData := Ofs(tdTool(ptr(0,0)^).usBytesPerSector);
  512.     Prop_SPC.OffsetData := Ofs(tdTool(ptr(0,0)^).usSectorsPerCluster);
  513.     Property_Action.OffsetData := Ofs(tdTool(ptr(0,0)^).usAction);
  514. end.
  515.